package com.chdwmp.product.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 应用常量类
 *
 * @author jinzhiyuan
 * @create 2020-07-14 14:48
 **/
@Component
public class ApplicationProperties {

    /**********************************************************************************
     * 数据库
     **********************************************************************************/
    /**
     * 数据库IP
     */
    @Value("${spring.datasource.url}")
    public String dbUrl;

    /**
     * 数据库username
     */
    @Value("${spring.datasource.username}")
    public String username;

    /**
     * 数据库密码
     */
    @Value("${spring.datasource.password}")
    public String password;

    /**
     * 数据库驱动名称
     */
    @Value("${spring.datasource.driverClassName}")
    public String driverClassName;

    /**
     * 初始化大小
     */
    @Value("${spring.datasource.dynamic.druid.initialSize}")
    public int initialSize;

    /**
     * 最小连接数
     */
    @Value("${spring.datasource.dynamic.druid.minIdle}")
    public int minIdle;

    /**
     * 连接池中最大连接数
     */
    @Value("${spring.datasource.dynamic.druid.maxActive}")
    public int maxActive;

    /**
     * 最大等待时间
     */
    @Value("${spring.datasource.dynamic.druid.maxWait}")
    public int maxWait;

    @Value("${spring.datasource.dynamic.druid.timeBetweenEvictionRunsMillis}")
    public int timeBetweenEvictionRunsMillis;

    @Value("${spring.datasource.dynamic.druid.minEvictableIdleTimeMillis}")
    public int minEvictableIdleTimeMillis;

    @Value("${spring.datasource.dynamic.druid.validationQuery}")
    public String validationQuery;

    @Value("${spring.datasource.dynamic.druid.testWhileIdle}")
    public boolean testWhileIdle;

    @Value("${spring.datasource.dynamic.druid.testOnBorrow}")
    public boolean testOnBorrow;

    @Value("${spring.datasource.dynamic.druid.testOnReturn}")
    public boolean testOnReturn;

    @Value("${spring.datasource.dynamic.druid.poolPreparedStatements}")
    public boolean poolPreparedStatements;

    @Value("${spring.datasource.dynamic.druid.maxPoolPreparedStatementPerConnectionSize}")
    public int maxPoolPreparedStatementPerConnectionSize;

    @Value("${spring.datasource.dynamic.druid.filters}")
    public String filters;






    /************************************************
     * 支付宝支付参数配置
     ************************************************/
    @Value("${alipay.appId}")
    public String ALIPAY_APPID;
    @Value("${alipay.pId}")
    public String ALIPAY_PID;
    @Value("${alipay.privateKey}")
    public String ALIPAY_PRIVATE_KEY;
    @Value("${alipay.publicKey}")
    public String ALIPAY_PUBLIC_KEY;
    @Value("${alipay.notify.url}")
    public String ALIPAY_NOTIFY_URL;
    @Value("${alipay.wap.pay.url}")
    public String ALIPAY_WAP_PAY_URL;
    @Value("${alipay.prepay.url}")
    public String ALIPAY_PRE_PAY_URL;//app支付
    @Value("${alipay.trade.query.url}")
    public String ALIPAY_TRADE_QUERY_URL;
    @Value("${alipay.trade.close.url}")
    public String ALIPAY_TRADE_CLOSE_URL;
    @Value("${alipay.gateway.api.url}")
    public String ALIPAY_GATEWAY_API_URL;
    @Value("${alipay.quit.url}")
    public String ALIPAY_QUIT_URL;
    @Value("${alipay.return.url}")
    public String ALIPAY_RETURN_URL;

    @Value("${is_pro}")
    public boolean is_pro;

    @Value("${ip_addr}")
    public String ip_addr;



}
